Skip to content

bound and isolate decoder state - #137

Open
harshvardhan-s1 wants to merge 5 commits into
masterfrom
bound_and_isolate_decoder_state
Open

bound and isolate decoder state#137
harshvardhan-s1 wants to merge 5 commits into
masterfrom
bound_and_isolate_decoder_state

Conversation

@harshvardhan-s1

Copy link
Copy Markdown
Contributor

No description provided.

/// Matches the limit the `file`, `syslog`, `stdin`, `file_descriptor` and `socket` mode `udp`
/// sources have always applied, so a frame length that is acceptable to one of those is acceptable
/// to every delimited framer.
pub const DEFAULT_MAX_FRAME_LENGTH_BYTES: usize = 100 * 1024;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default might cause issues with large packets say cloudtrail reqaqd from aws_s3 as they are a single line and can be larger than 10MB, for Azure I have seen much higher values in highers MB's. Not sure how we cn solve this but just flagging this one

///
/// Panics if called more than once, as the global cap may only be initialized a single time.
pub fn set_max_frame_length_bytes(size: usize) {
MAX_FRAME_LENGTH_BYTES

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we panic or return error or make the caller take a call on this

Comment thread src/sources/socket/tcp.rs
// one peer cannot redefine the template ids another peer's records decode against;
// without this every connection would inherit the configured decoder's single scope.
let mut decoder = self.decoder.clone();
if let Framer::Netflow(netflow) = &mut decoder.framer {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is present for both tcp and udp but missing for say uds, should we reuse it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants